package com.parfinex.sims.app;

import com.parfinex.sims.dao.ClassDao;
import com.parfinex.sims.entity.ClassInfo;
import org.junit.Test;
import java.sql.SQLException;

/**
 * Description:
 *
 * @author lijh
 * @version 1.0
 * @date 2021-11-14 16:18
 */
public class ClassInfoDaoTest {
    ClassDao classDao = new ClassDao();
    @Test
    public void testInsertClassInfo() throws SQLException {
        ClassInfo classInfo = new ClassInfo();
        classInfo.setClassName("7班");
        classInfo.setGradeName("二年级");
        classInfo.setMasterTeacher("朱文联");
        classInfo.setClassSlogan("争取第一，考试必胜！");
        classInfo.setClassNumberCount(35);

        //2.执行注册
        int insertClassInfo =classDao.updateClass(classInfo);
        if(insertClassInfo > 0){
            System.out.println("新增班级成功");
        }else{
            System.out.println("新增班级失败");
        }
    }
}
